<template>
	<view class="p_flex9 p_bg_fff p_bottom">
		<view class="p_flex_1">
			<slot></slot>
		</view>
		<view class="p_flex2">
			<view class="p_font_24 p_color_7a p_margin_r_16" v-if="isShowNum">共{{number}}件</view>
			<view class="p_flex2 p_margin_r_16" v-if="isShowPrice">
				<view class="p_font_24 p_color_7a p_margin_r_16">总计:</view>
				<view class="p_color_ff5555 p_font_32"><text class="p_font_24 p_margin_r_8">¥</text>{{priceNum}}</view>
			</view>
			<view class="p_quxiao_btn p_font_28 p_color_7a" v-if="btnText2" @click="$emit('getClear')">{{btnText2}}</view>
			<view class="p_btn" v-if="btnText1" @click="$emit('getSubmit')">
				<view>{{btnText1}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			btnText1: {
				type: String,
				default: ''
			},
			btnText2: {
				type: String,
				default: ''
			},
			isShowPrice: {
				type: Boolean,
				default: false
			},
			isShowNum: {
				type: Boolean,
				default: false
			},
			priceNum: {
				type: Number,
				default: 0
			},
			number: {
				type: Number,
				default: 0
			}
		}
	}
</script>

<style lang="less">
	.p_bottom {
		position: fixed;
		bottom: 0;
		width: 100%;
		padding: 18rpx 32rpx 38rpx;
		box-sizing: border-box;
		box-shadow: 0px 5rpx 20rpx #F3F3F3;
		z-index: 99;
	}

	.p_btn {
		width: auto;
		padding-left: 48rpx;
		padding-right: 48rpx;
		margin: 0 0 0 16rpx;
	}

	.p_quxiao_btn {
		height: 72rpx;
		padding-left: 48rpx;
		padding-right: 48rpx;
		box-sizing: border-box;
		border: 1px solid #E8E8E8;
		border-radius: 56rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		margin: 0 0 0 16rpx;
	}
</style>
